

#import <Foundation/Foundation.h>
#import "TalkfunSDKRtc.h"
#import "TalkfunSDK.h"
NS_ASSUME_NONNULL_BEGIN
#pragma mark - SDK代理
@protocol TalkfunSDKLiveDelegate <NSObject>

@optional
/**@name 进入房间的事件回调
 * - 如果加入成功，code 会是一个正数（code = 0），代表加入房间成功）。
 * - 如果加入失败，code 会是一个负数（code < 0），代表进房失败的错误码。 
 *  调用刷新refreshData: 也会重新回调
 *  进房失败的错误码含义请参见[错误码  TalkfunSDK 文件的TalkfunError 枚举
 */
- (void)onEnterRoom:(NSInteger)code result:(TFError*)error;
/** @name 当前用户进入房间触发
     详见 TFMember.h 中的定义
*/
- (void)onMemberJoinMe:(TFMember*)result;
/** @name 其它人进入房间触发
     详见 TFMember.h 中的定义
*/
- (void)onMemberJoinOther:(TFMember*)result;
/** @name 有人退出房间
     详见 TFMember.h 中的定义
*/
- (void)onMemberLeave:(TFMember*)result;
/**
 @name 同时在线人数  (真实人+虚拟人员 的总数)
*/
- (void)onPeakConcurrentUsers:(NSInteger)total;
/**
 @name 在线客服列表变更时会实时更新列表
*/
- (void)onCustomerServiceListUpdate:(NSMutableArray <TFMember *>* )list;
/**
 @name
    @state YES :全体禁言
           NO:全体解除禁言
*/
- (void)onChatDisableAll:(BOOL)state;
/**
 @name
    @state YES :单体禁言
           NO:单体解除禁言
*/
- (void)onChatDisable:(BOOL)state;
/**
   @name 公共广播
*/
- (void)onBroadcast:(TFBroadcast*)result;
/**
   @name 网络速度
*/
- (void)onNetworkSpeed:(TFNetworkSpeed*)result;
/**
   @name桌面分享开始
*/
- (void)liveDesktopStart;
/**
   @name桌面分享结束
*/
- (void)liveDesktopStop;
/**
*      桌面分享 2.0
*/
- (void)isRealDesktop:(BOOL)isDesktop;
/**
   @name桌面分享暂停
*/
- (void)liveDesktopPause;
/** @name 摄像头开启
*/
- (void)onCameraShow;
/** @name 摄像头关闭
*/
- (void)onCameraHide;
/** @name 接收滚动通知事件回调
    详见 TFAnnounceRoll.h 中的定义
 */
- (void)onAnnounceRoll:(TFAnnounceRoll*)result;
/** @name ppt显示
*/
- (void)onPptDisplay:(BOOL)show;
/**
 @name 接收主播发起签到的事件回调
*/
- (void)onSignNew:(TFSignNew*)result;
/**
 @name 接收主播结束签到的事件回调
*/
- (void)onSignEnd:(TFSignEnd*)result;
/**
 @name 已直播时长
*/
- (void)onLiveDuration:(TFLiveDuration*)result;
/**
 @name 直播结束的倒计时
*/
- (void)onLiveCountdown:(TFLiveDuration*)result;


/**
 @name 推送公告的事件回调
*/
- (void)onAnnouncement:(TFAnnouncement*)result;
/**
 @name  直播间状态    (直播未开始  开始直播   结束直播)
*/
- (void)onLiveStatus:(TalkfunLiveStatus)status;
/**
 @name  直播间模式切换  视频模式 桌面分享模式 RTC模式
*/
- (void)onLiveModeChange:(TFLiveModeChange*)status;
/**
 @name 1.视频加载播放成功  2.直播间模式切换成功
*/
//- (void)onPlaythroughOK;
/**
 @name  账号在多端登录相互挤下线
*/
- (void)onMemberForceout;
/**
 @name 当前用户被踢出房间的事件回调
*/
- (void)onMemberKick;
/** @name 接收别人的聊天事件回调
    详见 TFChatSend.h 中的定义
 */
- (void)onDidReceiveText:(TFChatData*)result;

/** @name 主播或助教@人的事件
    详见 TFChatData.h 中的定义
 */
- (void)onChatReply:(TFChatData*)result;

/** @name 删除聊天事件回调
 */
- (void)onChatDel:(NSString*)uuid;
/** @name 当前用户的花朵总数更新
 */
- (void)onFlowerTotal:(NSInteger)total;
/** @name 别人给主播送花
 */
- (void)onFlowerSend:(TFLiveFlowerData*)result;
/**
  @name 投票开始的事件回调
 */
- (void)onVoteNew:(TFVoteData*)result;
/**
  @name 投票结束的事件回调
 */
- (void)onVotePub:(TFVoteData*)result;
/**
  @name 删除投票的事件回调
 */
- (void)onVoteDel:(TFVoteData*)result;
/**
 @name 主播回答了问题
*/
- (void)onQuestionReply:(TFQuestionData*)result;
/**
 @name 提问删除
*/
- (void)onQuestionDelete:(TFQuestionData*)result;
/**
 @name 接收别人的提问
*/
- (void)onQuestionAsk:(TFQuestionData*)result;
/**
 @name 提问审核通过
*/
- (void)onQuestionAudit:(TFQuestionData*)result;

/**
 *  播放状态发生变化时候调用
 **/
- (void)playStatusChange:(TalkfunPlayStatus)status;
/**
 *  视频播放状态改变
 */
- (void)playerLoadStateDidChange:(TalkfunPlayerLoadState)loadState;
/**
 *  视频播放结束代理
 */
- (void)playerPlaybackDidFinish:(TalkfunPlayerMovieFinishReason)reason;
/**
 * @param status 播放状态
 * @param time   播放时间
 */
- (void)multiMediaApplicate:(TalkfunMultiMediaStatusChangeListener)status  time:(int)time;
/* 应用
 *@param id 素材id
 * @param docType 5：音频 ，4：视频
 * @param title 素材标题
 * @param duration 视频时长
 */
-(void)multiMediaApplicate:(NSString*)ID docType:(int)type title:(NSString*)title duration:(int)duration;
/* 应用 定时器倒计时  (还未开始倒计时)
*@param dict      应用的数据
* @param duration 剩余的时长倒计
*/
- (void)timeApplicater:(NSDictionary*)dict;
/* 关闭定时器
 */
- (void)timerClose;
/* 定时器开始倒计时
*@param  total 总时长
* @param duration 剩余的时长倒计
*/
- (void)timerStartWidthTotal:(NSInteger )total duration:(NSInteger)duration;
/*
 定时器暂停
* @param duration 剩余的时长倒计
*/
- (void)timerPause:(NSInteger)duration;
/*
 定时器重新开始
*/
- (void)timerReReady;
/*
  定时器倒计时完成
*/
- (void)timerEnd;
/*
   应用抢答器
*/
- (void)responderApplicate:(NSDictionary*)dict;
/*
   抢答器开始
*/
- (void)responderStartWidthDuration:(NSInteger)duration;

/* 关闭抢答器
 */
- (void)responderClose;
/* 抢答器重新开始
 */
- (void)responderReReady;

/* 抢答器成功的学员名字
   是不是自己
 */
- (void)responderSecond:(NSString*)name  second:(NSInteger)duration isMe:(BOOL)isMe;

/* 抢答器结束  (没人抢答)
*/
- (void)responderEnd;

/* 转盘应用
*/
- (void)turntableApplicate;
/* 转盘应用
   selected 选中的号码
   frequency 转盘未关闭前共转了多少次
*/
- (void)turntableSelected:(NSInteger)selected frequency:(NSInteger)count;

/*
  转盘关闭
*/
- (void)turntableClose;
/**
* @画板载入课件
*/
- (void)loadCourseware;

// 大班互动模式的视频的配置  宽高
- (void)videoProfileWidth:(CGFloat)width  hight:(CGFloat)hight;
/**
*     抽奖开始 1.0版本
*/
- (void)lotteryStart;
/**
    停止抽奖 1.0版本
    String pub; 公布中奖人 0：未公布 1： 公布
    String roomid; //房间id
    String launch_xid;  中奖人的xid
    String time; 时间
    String liveid;  直播id
    String course_id;课程id
    String uid;
    昵称
    String nickname;
    String launch_nickname;

   currentXid  当前账号的xid
  */
- (void)lotteryStop:(NSArray *)lotteryResult pub:(NSString*)pub gid:(NSString*)gid  currentXid:(NSString*)xid;
/**
 @name
   抽奖开始2.0 版本
*/
- (void)onLotteryStart:(TFLotteryStart*)result;
/**
 @name
   抽奖结束 2.0 版本
*/
- (void)onLotteryStop:(TFLotteryStop*)result;
//切换主讲人
-(void)onSwitchZhujiang:(TFKeyNote*)obj;
//切换视频模式
-(void)onSwitchVideoMode:(TalkfunPageMode)mode;

//当前页的画板的frame
- (void)whiteboardPageFrame:(CGRect)frame;

/*
  未连麦人员打开涂鸦权限
*/
-(void)onMemberDrawEnable:(TFMember*)model;
/*
  未连麦人员关闭涂鸦权限
*/
-(void)onMemberDrawDisable:(TFMember*)model;
/*
  未连麦人员奖励
*/
- (void)onMemberAward:(TFMember*)model;

/**
 @name 推送弹窗广告的事件回调
*/
- (void)onPopupPut:(TFPopupPut*)result;

/**
    宣传图入口数据更新
 */
-(void)onPopUp:(TFPageConfigGlobalSwitchPopUp*)popUp;
/**
 @name 发布试卷
*/
- (void)onExaminationPush:(TFQuestionnairePushResult*)result;
/**
 @name 主播提前-结束作答试卷
*/
- (void)onExaminationEnd:(TFQuestionnaireEndResult*)result;
/**
 @name 删除发布状态的试卷
*/
- (void)onExaminationDelete:(TFQuestionnaireDeleteResult*)result;
/**
 *  防作弊签到
 */
- (void)onPreventCheatingSignInListener:(TFSignLoopPreventCheat*)model;

/**
 @name 实时课件下载开关状态
*/
- (void)onDocumentDownload:(BOOL)enable;

/** 福袋推送*/
- (void)onLuckyBagPush:(TFLuckyBagPublish*)luckyBagInfo;
/** 福袋取消*/
- (void)onLuckyBagCance:(TFLuckyBagCance*)luckyBagInfo;
//福袋获胜
/**福袋获胜  isWinner: 当前用户是否中奖*/
- (void)onLuckyBagWinning:(TFLuckyBagWinning *)luckyBagWinningInfo isWinner:(BOOL)isWinner;
/**福袋通知*/
- (void)onLuckyBagNotice:(TFLuckyBagWinning *)luckyBagWinningInfo;
@end

@interface TalkfunSDKLive : NSObject

//是否设置涂鸦  默认 为 NO
@property (nonatomic,assign)BOOL graffiti;
@property(nonatomic,assign)BOOL isLoadCourseware;//是否载入课件了
@property (nonatomic,strong)NSString * uid;
@property (nonatomic,strong)NSString * xid;
@property (nonatomic,strong)NSString * pid;
/*  课前禁止聊天互动
    默认 YES
 */
@property (nonatomic,assign)BOOL chatBeforeClass;
/*  课后禁止聊天互动
    默认 YES
*/
@property (nonatomic,assign)BOOL chatAfterClass;
/*代理*/
@property (nonatomic,weak) id<TalkfunSDKLiveDelegate> delegate;
/*获取当前token*/
@property (nonatomic,copy,readonly) NSString * access_token;
/*获取当前播放视频的模式*/
@property (nonatomic,assign) TalkfunLiveMode liveMode;
/*获取视频窗口容器*/
@property (nonatomic,weak,readonly)   UIView * cameraContainerView;
/*获取ppt容器*/
@property (nonatomic,weak,readonly)   UIView * pptContainerView;
/*获取播放桌面分享的容器*/
@property (nonatomic,weak,readonly)   UIView * desktopContainerView;
/*音频视频容器*/
@property (nonatomic,strong)   UIView *mediaContainerView;
/*获取视频的播放状态*/
@property (nonatomic,assign) TalkfunPlayStatus playStatus;
/*当前用户信息*/
@property (nonatomic) NSDictionary *me;
/**获取课程模式 */
@property (nonatomic,assign)TalkfunPageMode pageMode;

/*是否开启自动的线路选择 默认为YES*/
@property (nonatomic) BOOL autoSelectNetwork;
/*评分系统是否开启*/
@property(nonatomic,assign)BOOL evaluate;
/*是否切换了摄像头和ppt容器*/
@property (nonatomic,assign) BOOL isExchanged;
@property (nonatomic,assign) BOOL isModeDesktopExchanged;//桌面分享的情况下切换
/*ppt是否显示*/
@property (nonatomic,assign) BOOL pptDisplay;
/*在请求数据 ,在刷新过程中*/
@property (nonatomic, assign)BOOL  isRefresh;
/*是否已经是桌面模式*/
@property (nonatomic,assign) BOOL realDesktop;
@property (nonatomic, assign)TalkfunLiveStatus liveStatus;//直播间状态
@property (nonatomic, strong)TalkfunSDKRtc *rtcManager;
/**
 * 4.10 设置 SDK 播放音量。
 *
 *  volume 音量大小，100为原始音量，范围是：[0 ~ 1]，默认值为1
 */
@property (nonatomic,assign) CGFloat playVolume;
/**视频播放模式 默认TalkfunMovieScalingModeAspectFit*/
@property(nonatomic,assign) TalkfunMovieScalingMode scalingMode;

@property(nonatomic,assign)BOOL closeVideoBeforeOnPodium;//上讲台之前关闭摄像头

@property(nonatomic,assign)BOOL closeAudioBeforeOnPodium; //上讲台之前关闭音频

/*rtc视频支持方向*/
@property (nonatomic, assign )TalkfunVideoOutputOrientationMode orientationMode;

/**
 *  初始化TalkfunLive，需要传入AccessToken和parameters（传入是否点播等参数）
 **/
- (TalkfunSDKLive *)initWithAccessToken:(NSString *)token parameters:(NSDictionary *)parameters;

/**
 *  初始化TalkfunLive，需要传入AccessKey和parameters（传入是否点播等参数）
 **/
- (TalkfunSDKLive *)initWithAccessKey:(NSString *)accessKey parameters:(NSDictionary *)parameters;

/**
 *  传入appID和appSecret来初始化TalkfunLive，parameters参数同上
 **/
- (TalkfunSDKLive *)initWithAppID:(NSString *)appID appSecret:(NSString *)appSecret parameters:(NSDictionary *)parameters;
/**
 *  配置appID和appSecret
 **/
- (void)configureAppID:(NSString *)appID appSecret:(NSString *)appSecret;
/**
 *  开关日志输出
 **/
- (void)setLogEnable:(BOOL)enable;
/**
 *  配置日志输出等级
 */
- (void)setLogLevel:(TalkfunLoggerLevel)level;
/**
 *  配置摄像头容器（可用于重新设置摄像头容器）
 *
 *  初始化完SDK后即可调用
 **/
- (void)configureCameraContainerView:(UIView *)cameraContainerView;
/**
 *  配置ppt容器（可用于重新设置ppt容器）
 *
 *  初始化完SDK后即可调用
 **/
- (void)configurePPTContainerView:(UIView *)pptContainerView;
/**
 *  配置桌面分享容器  || 视频播放容器  (默认是ppt容器)
 *
 *  初始化完SDK后即可调用
 **/
- (void)configureDesktopContainerView:(UIView *)desktopContainerView;
/**
 *  配置音视频分享容器(默认是ppt容器)
 *
 *  初始化完SDK后即可调用
 **/
- (void)configureMediaContainerView:(UIView *)mediaContainerView;
/** 配置暖场视频容器*/
- (void)configureWarmupContainerView:(UIView *_Nonnull)warmupContainerView;
/**
 *  交换ppt容器和摄像头容器，在你切换ppt和摄像头容器的时候调用
 **/
- (void)exchangePPTAndCameraContainer;
/**
 *  向服务器发送消息，处理回调数据
 *
 *  监听事件，event为事件名，获取的数据在回调的callback里面
 **/
- (void)emit:(NSString *)event parameter:(NSDictionary *)parameter callback:(void (^)(id obj))callback;
/**
 *  向服务器发送消息，处理回调数据
 *
 *  监听事件，event为事件名，获取的数据在回调的callback里面
 **/
- (void)emit:(NSString *)event withParameter:(NSDictionary *)parameter withCallback:(void (^)(id obj))callback NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, "该方法已过期，请查看TalkfunLive.h头文件");
/**
 *  监听事件，处理回调数据
 *
 *  监听事件，event为事件名，获取的数据在回调的callback里面
 **/
- (void)on:(NSString *)event callback:(void (^)(id obj))callback;
/**
 *  监听事件，处理回调数据
 *
 *  监听事件，event为事件名，获取的数据在回调的callback里面
 **/
- (void)on:(NSString *)event withCallback:(void (^)(id obj))callback NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, "该方法已过期，请查看TalkfunSDKLive.h头文件");
/**
 *  暂停
 *
 *  点播或者直播都可以暂停，一般只是用于点播的暂停
 **/
- (void)pause;
/**
 *  播放
 *  在暂停之后的播放调用
 **/
- (void)play;

/**
 *  播放2.0
 *  在暂停之后的播放调用
 **/
-(void)playWithCompletion:(void (^__nullable)(NSInteger code ,TFError *_Nullable  error))callback;
/**
 *  进入后台时是否暂停音频(默认暂停YES)
 **/
- (void)setPauseInBackground:(BOOL)pause;
/**
 *  签到
 **/
- (void)signIn:(NSString*)signId callback:(void (^__nullable)(NSInteger code , TFError *_Nullable  error))callback;
/**
 *  获取线路网络列表(根据返回的数据判断是直播或伪直播)
 **/
- (void)getNetworkList:(void (^)(id result))callback;
/**
 *  设置网络获取网络列表(根据是直播或伪直播,设置线路)
 *   operatorID        相应网络的key
 *   selectedSegmentIndex  是那个组  (第0组开始)
 **/
- (void)setNetwork:(NSString *)operatorID  selectedSegmentIndex:(NSInteger)selectedSegmentIndex;
/**  初始化时  默认的清晰度从监听 TALKFUN_EVENT_CURRENT_VIDEO_DEFINITION_LIST 事件获取*/
/**
 * 获取视频清晰度
 **/
- (NSArray*)getVideoDefinitionList;
/**设置视频清晰度*/
- (void)setVideoDefinition:(NSString*)definition;
/**
 *  切换token
 *
 *  当你需要切换accessToken又不销毁SDK时调用
 **/
- (void)configureAccessToken:(NSString * )token;
/**
 *  获取问答数据  (提问)
 *
 **/
- (void)getQuestionList:(void (^)(id result))callback;
/**
 *  SDK内部将维护接收聊天消息的队列
 *  设置该队列最大的聊天消息数量，及每秒展示的聊天消息数量
 *  queueSize: 默认 1000
 *  numberHandlePerSecond : 默认 3
 *
 **/
- (void)setChatReceiveQueueMaxSize:(NSInteger)queueSize numberHandlePerSecond:(NSInteger)number;
//**获取全部投票 (大班使用)*/
-(void)getVotes:(void (^)(id  result))callback;
//获取全部投票 (小班使用)   status数据是 TalkfunVoteStatus  类型 typedef enum {
//TalkfunVoteStatusValid  = 0, //已发起投票状态(包括投票结束并未公布)
//TalkfunVoteStatusPublic = 1, //投票结束并已公布
//TalkfunVoteStatusTemp  = 2, //投票保存但未发起状态
//
//}TalkfunVoteStatus;
//投票列表
-(void)getVoteList:(NSArray*)status callback:(void (^)(id  result))callback;

//投票详情
- (void)getVoteDetail:(NSString*)vid callback:(void (^)(id  result))callback;

//获取未收到的投票
-(void)getVotesUnreceived:(void (^)(id  result))callback;

//获取全部的广播
-(void)getBroadcasts:(void (^)(id  result))callback;

//获取未收到的广播
-(void)getBroadcastsUnreceived:(void (^)(id  result))callback;

//获取全部的广播2.0
-(void)getBroadcastsList:(void (^__nullable)(NSInteger code ,NSMutableArray <TFBroadcast *>*_Nullable  list ,TFError *_Nullable  error))callback;

//获取未收到的广播2.0
-(void)getBroadcastsUnreceivedList:(void (^__nullable)(NSInteger code ,NSMutableArray <TFBroadcast *>*_Nullable  list ,TFError *_Nullable  error))callback;

//提交主播的评价得分
-(void)sendScore:(NSDictionary*)parameter  callback:(void (^)(id  result))callback;
/**
*     提交对主播的评价得分2.0
**/
- (void)submitARating:(NSDictionary*)parameter callback:(void (^__nullable)(NSInteger code , TFError *_Nullable  error))callback;
/**
 *  配置摄像头容器（可用于重新设置摄像头容器）
 *
 *  初始化完SDK后即可调用
 **/
/**纯小班模式或者 大班互动模式  sdk*/
- (TalkfunSDKLive *)initWithAccessToken:(NSString *)token whiteboard:(UIView*)view configureCameraContainerView:(UIView *)cameraContainerView  ;

/**响应被邀请上讲台*/
-(void)respondinvite:(TalkfunRespondinviteStatus)status callback:(void (^)(id  result))callback;
/**
* 获取当前课程类型  (sdk初始化成功后才有值)
**/
- (TalkfunCourseType)getCourseType;
/**
* 抢答
**/
- (void)setResponder:(void (^)(NSDictionary* result))callback;
/**
* 抢答2.0
**/
- (void)sendResponder:(void (^__nullable)(NSInteger code , TFError *_Nullable  error))callback;

/**
 *  重新加载SDK  刷新
 **/
- (void)reload;
/**
 *  TalkfunLive单例
 **/
+ (TalkfunSDKLive *)shareInstance;

/** 进入房间
 *  调用  enterRoom() 接口执行进房操作后，会收到来自 SDK 的 onEnterRoom:result:() 回调：
 * @param param 进房参数，请参考 TalkfunSDKLiveInitParams
*/
- (void)enterRoom:(TalkfunSDKLiveInitParams *)param;
/**
 退出直播间,发送指令
 */
-(void)leaveliveroom:(NSString *)token callback:(void (^__nullable)(NSInteger code , TFError *_Nullable  error))callback;
/**
 *  销毁SDK
 *
 *  销毁SDK时调用以便彻底销毁SDK
 **/

- (void)destroy;

/*
 课程数据
 onEnterRoom:result:()回调后, roomInfo的值才准确
 */
@property (nonatomic,strong)TFLiveRoomInfo *roomInfo;
/**
  发送聊天
  result result = 0 成功），result != 0 时为错误码。
 */
- (void)sendChat:(NSString *)msg
        callback:(void (^__nullable) (NSInteger code,  TFChatData*_Nullable  model ,TFError *_Nullable  error))callback;
/**
     发送花朵
     flower_left_time  花朵生成倒计时
 */
- (void)sendFlower:(void (^__nullable) (NSInteger code,  TFLiveFlowerData*_Nullable  model ,NSInteger flower_left_time))callback;
/**
  发起提问
 */
- (void)enterAskQuestions:(NSString *)msg
                 callback:(void (^__nullable) (NSInteger code,  TFQuestionData*_Nullable  model ,TFError *_Nullable  error))callback;
/**
 *  获取提问列表
 **/
- (void)getAListOfQuestions:(void (^__nullable) (NSInteger code,  NSMutableArray <TFQuestionData *>*_Nullable  list ,TFError *_Nullable  error))callback;
/**
    课程类型是直播的 获取网络线路组 2.0
 */
- (void)getLineList:(void (^_Nullable)(TFLiveLineManager * _Nullable result))callback;
/**
   课程类型是直播的 设置线路 2.0
 *      例子:
 *     "operatorID" : "telecom"          网络类型
       "selectedSegmentIndex" : 0,   组索引
 **/
- (void)setNetwork:(NSString *_Nonnull)operatorID  selectedSegmentIndex:(NSInteger)selectedSegmentIndex
          callback:(void (^__nullable)(NSInteger code ,TFError *_Nullable  error))callback;
/**
    课程类型是伪直播时 获取网络线路组 2.0  初始化成功后可以根据判断是否为伪直播  self.roomInfo.isVodLive
 */
- (void)getPlaybackLineList:(void (^_Nullable)(TFPlaybackLineManager * _Nullable result))callback;
/**
 *  设置伪直播播放对应的线路(点播)
 *  把相应线路传进SDK
 **/
- (void)setPlaybackLine:(NSInteger)lineIndex;
/**
      获取投票列表 2.0
 **/
- (void)getVotingList:(void (^__nullable)(NSInteger code ,NSMutableArray <TFVoteData *>*_Nullable  list ,TFError *_Nullable  error))callback;
/**
      获取投票ID详情 2.0
 **/
- (void)getVotingDetails:(NSString*)vid
                callback:(void (^__nullable)(NSInteger code , TFVoteData *_Nullable model,TFError *_Nullable  error))callback;
/**
      确认投票 2.0
 **/
- (void)voteSubmit:(TFSubmit*)model
          callback:(void (^__nullable)(NSInteger code , TFError *_Nullable  error))callback;

/**
      获取问卷列表
 **/
- (void)getQuestionnaireList:(TFMemberParams*)params
                    callback:(void (^__nullable)(NSInteger code ,TalkfunQuestionnaireResult* result,TFError *_Nullable  error))callback;
/**
 获取试卷详情
 **/
- (void)getExaminationDetail:(TTFExaminationDetailParam*)param
                    callback:(void (^__nullable)(NSInteger code ,TFExaminationDetail* result,TFError *_Nullable  error))callback;
/**
     填写试卷
 **/
- (void)fillExaminationAnswers:(TFFillExaminationAnswersParam*)param
                      callback:(void (^__nullable)(NSInteger code,TFError *_Nullable  error))callback;
/**
     提交试卷  
 **/
- (void)examinationSubmit:(TFExaminationSubmitParam*)model
                 callback:(void (^__nullable)(NSInteger code,TFError *_Nullable  error))callback;

/**
     开启画中画 关闭画中画
     默认:关闭状态
 **/
- (void)pictureInPicture:(BOOL)isOpen;
//1.判断是否支持画中画功能
- (BOOL)isPictureInPictureSupported;

/**在线人员列表*/
- (void)getMemberList:(void (^__nullable)(NSInteger code ,NSMutableArray <TFMember *>*_Nullable  list ,TFError *_Nullable  error))callback;

/**
    防作弊签到
    type | 0: 倒计时结束后发
        1: 继续学习
 */
- (void)preventCheatingSignInType:(NSInteger)type callback:(void (^_Nonnull)(NSInteger code,TFError *_Nullable  error))callback;
/**
   举报主播
 */
- (void)reportingMembers:(NSString*)msg
                callback:(void (^__nullable)(NSInteger code , TFError *_Nullable  error))callback;
/**查看福袋详情**/
- (void)getLuckyBag:(NSInteger)ID
           callback:(void (^_Nonnull)(NSInteger code, TFLuckyBag_details *_Nullable model ,TFError *_Nullable  error))callback;
/**福袋中奖列表**/
- (void)getListLuckyBagWinner:(NSInteger)ID
           callback:(void (^_Nonnull)(NSInteger code, TFListLuckyBagWinner *_Nullable model ,TFError *_Nullable  error))callback;
/**参与福袋开奖*/
- (void)participateLuckyBag:(NSInteger)ID callback:(void (^_Nonnull)(NSInteger code,TFError *_Nullable error))callback;
/**领取信息填写*/
- (void)completeLuckyBagReceiveInfo:(NSString*)receiveInfo ID:(NSInteger)ID callback:(void (^_Nonnull)(NSInteger code,TFError *_Nullable error))callback;
@end
NS_ASSUME_NONNULL_END
